/*动态加载Kingfishers组件*/
void function(){
    if(window.k_core_loaded) return;//避免重复加载
    var isMSIE = /*@cc_on!@*/false;
    var getScriptConfig = function(scriptName){
        var scripts=document.getElementsByTagName("script"), len = scripts.length, script;
        for(var i=0;script=scripts[i],i<len;i++){
            if(script.src != null){
                var index=script.src.indexOf(scriptName);
                if(index>=0){
                    return {obj:script,path:((index==0)?"":script.src.substr(0,index))}
                }
            }
        }
        return null;
    }
    var self_script_config = getScriptConfig("logger.js");
    if(self_script_config != null){
        var script = self_script_config.obj,path = self_script_config.path;
        var enabled =((script.getAttribute("enabled")=="false")?false:true);
        document.write('<SCRIPT type="text/javascript" src="'+path+'logger-base.js"><\/SCRIPT>');
        if(enabled) {
            var attr,attrs = script.attributes;
            if(isMSIE){// IE
            	document.write(script.outerHTML.replace(".js","-core.js"));
            }else{
                var str="<SCRIPT";
                for(var i=0;i<attrs.length;i++){
                    attr = attrs[i];
                    if(attr.specified) {
                        str+=" "+attr.name+'="'+((attr.name=="src")?path+"logger-core.js":attr.value)+'"';
                    }
                }
                str+="><\/SCRIPT>";
                document.write(str);
            }
        }
        script.parentNode.removeChild(script);//功德圆满,凤凰涅槃!
        window.k_core_loaded = true;
    }
}();

